package service;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import dao.UserDaoInterface;
import entity.User;

public class MainTest {

	public static void main(String[] args) {
		// testSpringIbatis();
		testIbatis();
	}
	
	public static void testIbatis() {
		ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
		UserDaoInterface userDao = (UserDaoInterface) ac.getBean("userDaoProxy");
		try {
			User user = userDao.getUser("101");
			System.out.print(user.getDescription());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

    public String sayHello(String name) {
        System.out.println(name);
        return"hello," + name;
    }



}
